import React from 'react'
class MyTextInput extends React.Component{
  constructor(props) {
    super(props)
    this.refs=React.createRef()
  }
  focusText() {
    this.ref.current.focus()
  }
  render() {
    return (
      <label>
        <span>
          {this.props.label}
        </span>
        <input type="text" onChange={this.props.onChange} ref={this.ref}/>
      </label>
    )
  }
}
export default MyTextInput